From: Jure Kajzer Date: Fri, 2 Sep 2011 06:58:08 +0000 (+0000) Subject: * added redundand join condition for index usage as per comment on CR r88008 X-Git-Tag: 1.31.0-rc.0~27960 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=172cfa589d408d61f3d096658aba296edbaf390a;p=lhc%2Fweb%2Fwiklou.git * added redundand join condition for index usage as per comment on CR r88008 --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index ab01b1db6c..1d0eed74db 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -518,11 +518,11 @@ class ContribsPager extends ReverseChronologicalPager { $index = 'user_timestamp'; # @todo FIXME: Other groups may have 'bot' rights $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); } else { $tables = array( 'recentchanges', 'page', 'revision' ); $condition['rev_user_text'] = $this->target; - $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" ); + $join_conds['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid AND rev_timestamp = rc_timestamp" ); $index = 'usertext_timestamp'; } if( $this->deletedOnly ) {